package com.example.cloudmusicserve.dao;

import com.example.cloudmusicserve.entity.RecentPlay;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @description: MusicDao
 * @author: xiaoyuan
 * @time: 2023/5/29
 */
@Repository
public interface MusicDao {

    //添加最近播放列表
    public int addMusicRecord(RecentPlay recentPlay);

    //通过用户名去获取相应的信息
    public List<RecentPlay> queryByUsername(RecentPlay recentPlay);

    //通过用户名和歌曲的编号来进行查询
    public Integer queryByMusicIdAndUsername(RecentPlay recentPlay);

    //删除重复数据
    public Integer deleteCommonData(RecentPlay recentPlay);

    //删除过期音乐
    public  Integer deleteOverTimeMusic(RecentPlay recentPlay);

}
